#include "cpu/exec/template-start.h"

#define instr jg

static void do_execute() {
    int len   = 1 + DATA_BYTE;
    uint32_t fall_through = cpu.eip + len;
    int32_t offset = (DATA_TYPE_S)op_src->val;
    uint32_t branch_target = fall_through + offset;

    if (cpu.eflags.ZF == 0 && (cpu.eflags.SF == cpu.eflags.OF)) {

        cpu.eip = branch_target-len;
    }
    print_asm(str(instr) " %x", branch_target);
}

make_instr_helper(i)

#include "cpu/exec/template-end.h"